package com.ruoyi.cqjd.domain;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 菜品分类对象 cqjd_category
 * 
 * @author ruoyi
 * @date 2022-06-21
 */
public class CqjdCategory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    //用于把long转成字符串，避免前端js因id过长导致精度丢失引起id不一致。
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /** 分类名称 */
    @Excel(name = "分类名称")
    private String name;

    /** 顺序 */
    @Excel(name = "顺序")
    private Long sort;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setSort(Long sort) 
    {
        this.sort = sort;
    }

    public Long getSort() 
    {
        return sort;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("sort", getSort())
            .toString();
    }
}
